package com.member.mp.utils;

import com.aliyun.dysmsapi20170525.Client;
import com.aliyun.teaopenapi.models.Config;

/***
 * @Title:
 * @ClassName: com.hssmart.common.utils.AliyunSms.java
 * @Description:
 *
 * @Copyright suihao- Powered By 研发中心
 * @author: suihao
 * @date: 2022-11-01 15:51
 * @version V1.0
 */
public class AliyunSms {
    /**
     * 使用AK&SK初始化账号Client
     *
     * @param accessKeyId
     * @param accessKeySecret
     * @return Client
     * @throws Exception
     */
    public static Client createClient(String accessKeyId, String accessKeySecret) throws Exception {
        Config config = new Config()
                // 您的 AccessKey ID
                .setAccessKeyId(accessKeyId)
                // 您的 AccessKey Secret
                .setAccessKeySecret(accessKeySecret);
        // 访问的域名
        config.endpoint = "dysmsapi.aliyuncs.com";
        return new Client(config);
    }

}

